<?php


namespace App\Http\Controllers;


use App\Services\Sms;
use D1M\Common\Helpers\Result;
use Illuminate\Http\Request;

class SmsController
{
    public function send(Request $request, Sms $service)
    {
        $params = $request->only('phone');
        $result = $service->send($params['phone']);
        return $result['error'] ? Result::fail($result['message']) : Result::success();
    }
}